package club.haomoon.core.mapper.admin;

import club.haomoon.core.common.BaseDataMpper;
import club.haomoon.core.entity.admin.JobsData;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * -------------------------
 * @Description: 工作岗位 Mapper
 * @Author: Wangjianwei
 * @Date: 2025/02/11 16:30
 * -------------------------
 */
@Mapper
public interface JobsDataMapper extends BaseDataMpper<JobsData> {

    @Select("SELECT * FROM cms_jobs_data jobs INNER JOIN cms_admin_jobs_data laj ON laj.jobs_id = jobs.id WHERE laj.admin_id = #{adminId} AND jobs.delete_time IS NULL")
    List<JobsData> getByAdminId(@Param("adminId") Integer adminId);

}
